#######################################
# Order of the Sacred Magdalene
# House of Mercy Decisions
#######################################

decisions = {
	ggsm_work_whore = {
		picture = GFX_ggsm_work_whore
		is_high_prio = yes

		potential = {
			ai = no
			ggsm_house_base_worker_trigger = yes
		}

		allow = {
			ggsm_can_work_as_prostitute_trigger = yes
		}

		effect = {
			clr_character_flag = ggsm_house_busy
			clr_character_flag = ggsm_whored

			# Establish her House rate before looking for a patron.
			# If nobody who meets her social and financial requirements
			# is available, the shift ends through ggsmhw.150.
			hidden_tooltip = {
				ggsm_house_set_payment_bracket_effect = yes
			}

			# If both separate patron pools are available, choose one pool
			# before the House route opens. The service itself never mixes them.
			if = {
				limit = {
					ggsm_house_has_male_client_trigger = yes
					ggsm_house_has_female_client_trigger = yes
				}
				random_list = {
					50 = { long_character_event = { id = ggsmhm.1 } }
					50 = { long_character_event = { id = ggsmhm.200 } }
				}
			}

			if = {
				limit = {
					ggsm_house_has_male_client_trigger = yes
					NOT = { ggsm_house_has_female_client_trigger = yes }
				}
				long_character_event = { id = ggsmhm.1 }
			}

			if = {
				limit = {
					ggsm_house_has_female_client_trigger = yes
					NOT = { ggsm_house_has_male_client_trigger = yes }
				}
				long_character_event = { id = ggsmhm.200 }
			}

			if = {
				limit = {
					NOT = { ggsm_house_has_male_client_trigger = yes }
					NOT = { ggsm_house_has_female_client_trigger = yes }
				}
				long_character_event = { id = ggsmhw.150 }
			}
		}

		revoke_allowed = {
			always = no
		}

		ai_will_do = {
			factor = 0
		}
	}

	ggsm_repair_house_mercy_shift = {
		picture = GFX_ggsm_work_whore
		is_high_prio = yes

		potential = {
			ai = no
			society_member_of = ggsm_order_sacred_magdalene
			has_character_flag = ggsm_house_shift
		}

		allow = {
			always = yes
		}

		effect = {
			long_character_event = { id = ggsmhm.900 }
		}

		revoke_allowed = {
			always = no
		}

		ai_will_do = {
			factor = 0
		}
	}
}
